
for i in range(999, 99, -1):
    for j in range(90 * 11, 9 * 11, -11):
        s = str(i * j)
        if len(s) == 6 \
            and s[0] == s[-1] \
            and s[1] == s[-2] \
            and s[2] == s[-3]:
            print i, j, i * j